<script setup>
import {useFetch} from "#app";

import { useTimetableStore } from "~/store/timetable.js";
import {storeToRefs} from "pinia";

const timetableStore = useTimetableStore()

const timetableList = storeToRefs(timetableStore)


const getData = async () => {
  const response = await useFetch('/api/timetable')
  const data = JSON.parse(response.data.value)
  const response_next = await useFetch('/api/timetablenext')
  const data_next = JSON.parse(response_next.data.value)
  timetableStore.set(data, data_next)
}
getData()
</script>

<template>
<div class="grid grid-main w-dvw h-dvh overflow-x-hidden overflow-y-hidden">
  <Header />
  <Main />
</div>
</template>

<style scoped>
.grid-main {
  grid-template-columns: minmax(220px, 0.2fr) 1fr;
}
</style>
